<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>工资管理</title>
    <#include "/common/link.ftl">

</head>
<body class="hold-transition skin-black sidebar-mini">
<div class="wrapper">
    <#include "/common/navbar.ftl">
    <!--菜单回显-->
    <#assign currentMenu="salary"/>
    <#include "/common/menu.ftl">
    <div class="content-wrapper">
        <section class="content-header">
            <h1>工资管理新增/编辑</h1>
        </section>
        <section class="content">
            <div class="box">
                <form class="box-body" style="margin: 10px" class="form-horizontal" id="editForm" enctype="multipart/form-data" action="/salary/saveOrUpdate" method="post" >
                    <input type="hidden" name="id" value="${salary.id}">
                    <div class="row">
                        <div class="col-md-5">
                            <div class="form-group">
                                <label>年份：</label>
                                <input type="text" class="form-control" name="year" value="${salary.year}"
                                       placeholder="请输入年份">
                            </div>
                            <div class="form-group">
                                <label >月份：</label>
                                <input type="text" class="form-control" name="month" value="${salary.month}"
                                       placeholder="请输入月份">
                            </div>
                            <div class="form-group">
                                <label>员工：</label>
                                <select class="form-control" name="employee.id">
                                    <option value="">请选择员工</option>
                                    <#list employees as es>
                                        <option value="${es.id}">${es.name}</option>
                                    </#list>
                                </select>
                            </div>
                            <div class="form-group">
                                <label>工资：</label>
                                <input type="text" class="form-control" name="money" value="${salary.money}"
                                       placeholder="请输入工资">
                            </div>
                            <div class="form-group">
                                <label >发放方式：</label>
                                <select class="form-control" name="payout.id">
                                    <option value="">请输入发放方式</option>
                                    <#list payTyps as ps>
                                        <option value="${ps.id}">${ps.title}</option>
                                    </#list>
                                </select>
                            </div>
                            <script>
                                $("select[name='employee.id']").val(${salary.employee.id})
                                $("select[name='payout.id']").val(${salary.payout.id})
                            </script>
                        </div>
                    </div>
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <button type="submit" class="btn btn-primary btn-submit">保存</button>
                </form>

            </div>
        </section>
    </div>
    <#include "/common/footer.ftl">
</div>
</body>
</html>
